 <?php
	$public_application = $this->config->item('public_application');
 ?>
<script src="<?php echo base_url($public_application."js/jquery.validate.min.js")?>"></script>
<div class="main-bg clearfix">
  <div class="container main-box clearfix">
  	<?php if(validation_errors()){error(validation_errors()); } if($error){error($error);}?>
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <p class="text-center mt-2em">
		           <p class="text-center">填写用户名和对应的邮箱，按照收到的邮件提示更改密码</p>
		    </p>
		   
			  <?php 
			  $attributes = array(
				'class' => "form-horizontal",
				'id' => "get_password_form"
			  ); 
			  echo form_open('account/get_password',$attributes);
			  ?>
		          <input type="hidden" name="action" value="send_password"/>

		  <div class="form-group">
		    <label  class="col-sm-2 control-label">用户名</label>
		    <div class="col-md-8 col-sm-8">
		      <input type="text" class="form-control input-lg" name="username" value="<?php echo $set_value['username']?>" required>
		    </div>
		  </div>
		  <div class="form-group">
		    <label  class="col-sm-2 control-label">邮箱</label>
		    <div class="col-md-8 col-sm-8">
		      <input type="email" class="form-control input-lg" name="email" value="<?php echo $set_value['email']?>" required>
		    </div>
		  </div>
		 
		  <div class="form-group">
		    <div class="col-sm-offset-2 col-sm-10">
		      <button type="submit" class="btn btn-danger">提交申请</button>
		      <button type="reset" class="btn ">取消</button>
		    </div>
		  </div>
		 
		  <?php echo form_close();?>
		</div>
		
		</div>
	</div>
  </div>
    <script>
 $(document).ready(function(){
	 $('#get_password_form').validate({
		
		 errorPlacement: function(error, element) {
			    error_box = $('<div class="col-md-5 col-sm-5 "> </div>');
			    error_box.append(error);
			    
			      error_box.appendTo(element);  
		 }
	 });
 });
</script>